package com.pcafs;

import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;

/**
 * 启动程序
 * 
 * @author pcafs
 */

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ImportResource("classpath:ureport-console-context.xml")
public class PcafsApplication
{
    public static void main(String[] args)
    {
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(PcafsApplication.class, args);
        System.out.println(
                "=====================================================================\n" +
                "==                                                                 ==\n" +
                "==================== 主成分分析财务系统 启动成功 =================\n" +
                "==                                                                 ==\n" +
                "=====================================================================");
    }
    @Bean
    public ServletRegistrationBean ureportServlet(){
        return new ServletRegistrationBean(new UReportServlet(),"/ureport/*");
    }
}
